
#ifdef GL_ES
precision mediump float;
#endif

const float PI=3.1415926535;

uniform vec2 u_resolution;
uniform float u_time;

void main(){
    vec2 coord=gl_FragCoord.xy/u_resolution;
    vec3 color=vec3(0.);
    
    float angle=atan(-coord.y+.25,coord.x-.5)*.1;
    float len=length(coord-vec2(.5,.25));

    float size = 12.0;
    float alpha = sin(floor(coord.x*size)+ u_time*4.0)+0.5;
    
    color.r+=sin(len*60.+angle*50.+u_time);
    color.g+=cos(len*30.+angle*50.-u_time);
    color.b+=sin(len*20.+angle*50.+3.0);
    
    gl_FragColor=vec4(color,alpha);
}